package com.jtzc.mcp.coze;

import com.jtzc.mcp.coze.domain.service.CozeWorkFlowService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;


@Slf4j
@SpringBootApplication
public class McpServerApplication {
    public static void main(String[] args) {
        SpringApplication.run(McpServerApplication.class, args);
    }



    /**
     * 暴露tools
     */
    @Bean
    public ToolCallbackProvider cozeTools(CozeWorkFlowService cozeWorkFlowService) {
        return MethodToolCallbackProvider.builder().toolObjects(cozeWorkFlowService).build();
    }

}
